import service from '@/utils/request'

// @Tags GoodsOrder
// @Summary 创建GoodsOrder
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.GoodsOrder true "创建GoodsOrder"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /goodsOrder/createGoodsOrder [post]
export const createGoodsOrder = (data) => {
     return service({
         url: "/goodsOrder/createGoodsOrder",
         method: 'post',
         data
     })
 }


// @Tags GoodsOrder
// @Summary 删除GoodsOrder
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.GoodsOrder true "删除GoodsOrder"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /goodsOrder/deleteGoodsOrder [delete]
 export const deleteGoodsOrder = (data) => {
     return service({
         url: "/goodsOrder/deleteGoodsOrder",
         method: 'delete',
         data
     })
 }

// @Tags GoodsOrder
// @Summary 删除GoodsOrder
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除GoodsOrder"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /goodsOrder/deleteGoodsOrder [delete]
 export const deleteGoodsOrderByIds = (data) => {
     return service({
         url: "/goodsOrder/deleteGoodsOrderByIds",
         method: 'delete',
         data
     })
 }

// @Tags GoodsOrder
// @Summary 更新GoodsOrder
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.GoodsOrder true "更新GoodsOrder"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /goodsOrder/updateGoodsOrder [put]
 export const updateGoodsOrder = (data) => {
     return service({
         url: "/goodsOrder/updateGoodsOrder",
         method: 'put',
         data
     })
 }


// @Tags GoodsOrder
// @Summary 用id查询GoodsOrder
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.GoodsOrder true "用id查询GoodsOrder"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /goodsOrder/findGoodsOrder [get]
 export const findGoodsOrder = (params) => {
     return service({
         url: "/goodsOrder/findGoodsOrder",
         method: 'get',
         params
     })
 }


// @Tags GoodsOrder
// @Summary 分页获取GoodsOrder列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.PageInfo true "分页获取GoodsOrder列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /goodsOrder/getGoodsOrderList [get]
 export const getGoodsOrderList = (params) => {
     return service({
         url: "/goodsOrder/getGoodsOrderList",
         method: 'get',
         params
     })
 }

 // 查询运送中的订单
 export const getDeliveryGoodsOrderList = (params) => {
    return service({
        url: "/goodsOrder/getDeliveryGoodsOrderList",
        method: 'get',
        params
    })
}

 // 查询运送中的订单
 export const getGoodsOrderById = (params) => {
    return service({
        url: "/goodsOrder/getGoodsOrderById",
        method: 'get',
        params
    })
}

export const createRelateBill = (params) => {  // 特别要注意 data 和 params的区别
    return service({
        url: "/goodsOrder/createRelateBill",
        method: 'get',
        params
    })
}

export const setStateStorage = (params) => {
    return service({
        url: "/goodsOrder/setStateStorage",
        method: 'get',
        params
    })
}
